<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.w3.org/1999/xhtml" layout:decorator="layouts/default">
<!--<html layout:decorator="layouts/default">-->

<!-- title -->
<th:block layout:fragment="title">
    长线调配
</th:block>
<!-- head -->
<th:block layout:fragment="head">
    <!--页面自定义样式-->
    <link rel="stylesheet" th:href="@{/js/allot/defaultTheme.css}">
    <link rel="stylesheet" href="/css/element-ui2.3.3.css">
    <style>

    </style>
</th:block>

<!-- content -->
<th:block layout:fragment="content">

    <div class="content" id="app" v-loading="loading" v-cloak>
        <!--页面js-->
        <h1 class="title">长期调配</h1>

        <span>车型：</span>
        <el-radio-group v-model="currSpuCode" @change="queryAllotLongBySpuList">
            <template v-for="item of spuList">
                <el-radio-button :label="item.spuCode"></el-radio-button>
            </template>
        </el-radio-group>

        &nbsp;&nbsp;&nbsp;&nbsp;

        <span>年度：</span>
        <el-radio-group v-model="currYear" @change="queryAllotLongByYearList">
            <template v-for="item of yearList">
                <el-radio-button :label="item.year"></el-radio-button>
            </template>
        </el-radio-group>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <el-button  style="padding: 15px;"  size="small" type="primary">导出</el-button>
    </div>
        <br><br>
   <!-- -table -->
    <div style="overflow: hidden;">
        <table id="mainTable" cellspacing="0" cellpadding="0" border="0" class="fancyTable">
            <thead>
            <tr>
                <th colspan="1" rowspan="1" class="is-center" style="width:120px">
                    <div class="cell">类别</div>
                </th>
                <th colspan="1" rowspan="1" class="is-center" style="width:120px">
                    <div class="cell">VDC</div>
                </th>
                <th colspan="1" rowspan="1" class="is-center" style="width:120px">
                    <div class="cell">全年</div>
                </th>
                <th v-for="n in weekCount" class="is-center" style="width: 120px">
                    <div class="cell">第{{n}}周</div>
                </th>
            </tr>
            </thead>

            <tbody>
            <tr v-for="(item, index) of produceAmount">
                <td :rowspan="produceAmount.length" v-show="index==0" class="is-center">
                    <div class="cell">产量</div>
                </td>
                <td class="is-center">
                    <div class="cell">{{item.vdcName}}</div>
                </td>
                <td class="is-center">
                        <!--<span>-->
                            <!--<div class="cell">{{item.weekPlanCount}}</div>-->
                        <!--</span>-->
                </td>

                <td v-for="n in weekCount" class="is-center">
                        <span>
                            <div class="cell">{{item['wk'+n]}}</div>
                        </span>
                </td>
            </tr>

            <tr v-for="(item,index) of orderAmount">
                <td :rowspan="orderAmount.length" v-show="index==0" class="is-center">
                    <div class="cell">销量</div>
                </td>
                <td class="is-center">
                    <div class="cell">{{item.vdcName}}</div>
                </td>
                <td class="is-center">
                    <!--<div class="cell">{{item.weekPlanCount}}</div>-->
                </td>


                <td v-for="n in weekCount" class="is-center">
                    <div class="cell">{{item['wk'+n]}}</div>
                </td>
            </tr>
            <tr v-for="(item,index0) of weekedStockAmount">
                <td :rowspan="weekedStockAmount.length" v-show="index0==0" class="is-center">
                    <div class="cell">周末库存</div>
                </td>
                <td class="is-center">
                    <div class="cell">{{item.vdcName}}</div>
                </td>
                <td class="is-center">
                    <!--<div class="cell">{{item.weekPlanCount}}</div>-->
                </td>


                <td v-for="n in weekCount" class="is-center">
                    <div class="cell">{{item['wk'+n]}}</div>
                </td>
            </tr>
            <tr v-for="(item,index) of stockRate">
                <td :rowspan="stockRate.length" v-show="index==0" class="is-center">
                    <div class="cell">库存系数</div>
                </td>
                <td class="is-center">
                    <div class="cell">{{item.vdcName}}</div>
                </td>
                <td class="is-center">
                    <!--<div class="cell">{{item.weekPlanCount}}</div>-->
                </td>


                <td v-for="n in weekCount" class="is-center">
                    <!--<div class="cell">{{weekendStockRatio(index, 'wk'+n)}}</div>-->
                </td>
            </tr>
            </tbody>
        </table>


</th:block>

<!-- js -->
<th:block layout:fragment="js">

    <script src="/js/vue.js"></script>
    <script src="/js/element-ui2.3.3.js"></script>
    <script src="/js/jquery-3.2.1.min.js"></script>

    <script th:src="@{/js/allot/allotlong.js}"></script>
    <script th:src="@{/js/allot/jquery.fixedheadertable.min.js}"></script>
</th:block>


</html>